<template>
  <h1>vue3组件的使用</h1>
  <p>count:{{count}}</p>
  <button @click="addCount">点击改变count</button>
</template>

<script lang="ts">
import {defineComponent} from "vue"
export default defineComponent({
  name: "About",
  //setup函数中的数据不是响应式的
  setup(){
    let count = 100

    const addCount = () => {
      count++
      console.log(count);
    }

    return{
      count,
      addCount
    }
  }
})

</script>

<style lang="less">
</style>